#pragma once 
#include "System.h"
#define FPS 30.0f

    struct GameState
	{
		  unsigned int state;
	};

	extern unsigned gGameStateInit;
	extern unsigned gGameStateCurr;
	extern unsigned gGameStatePrev;
	extern unsigned gGameStateNext;

	class GameStateManager
	{
	public:
		GameStateManager(int stateid);
		void AddSystem(System* sys);
		void RunLoop();
		void Load(void);
		void Init(void);
		void Update(void);
		void Free(void);
		void Unload(void);
		~GameStateManager();

	private:
		// Game loop function prototypes
		
		float CapFramerate();

//	private:
		std::vector<System*> systems; // Game engine system list
		MessageHandler* handler; // message handler
		unsigned prevTime; // previous frame time
	};
